package com.bcn.login_mybatis_demo.mapper;

import com.bcn.login_mybatis_demo.dto.RoleDTO;
import com.bcn.login_mybatis_demo.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface RoleMapper {
    List<Role> selectRole(@Param("roleDTO") RoleDTO roleDTO,@Param("offset")int offset,@Param("pageSize")int pageSize);
    long countRole(@Param("roleDTO") RoleDTO roleDTO);
    Role selectRoleById(@Param("id") int id);
    Role selectRoleByName(@Param("name") String name);
    void createRole(Role role);
    void deleteRoleById(@Param("id") int id);
    void updateRole(Role role);
}
